SSCF_TEST_CPPFILE = sscf_test.cpp 
SSCF_TEST_TARGET = sscf_test 
SOCKETPOOL_TEST_CPPFILE = socketpool_test.cpp 
SOCKETPOOL_TEST_TARGET = socketpool_test 
SSERVER_TEST_CPPFILE = sserver_test.cpp
SSERVER_TEST_TARGET = sserver_test
SSCF_TEST_OBJFILE = $(patsubst %.cpp, %.o, $(SSCF_TEST_CPPFILE))
SOCKETPOOL_TEST_OBJFILE = $(patsubst %.cpp, %.o, $(SOCKETPOOL_TEST_CPPFILE))
SSERVER_TEST_OBJFILE = $(patsubst %.cpp, %.o, $(SSERVER_TEST_CPPFILE))
TARGETS = $(SSCF_TEST_TARGET) $(SOCKETPOOL_TEST_TARGET) ${SSERVER_TEST_TARGET}
CXX = g++
INC_DIR = -I../../../3party/log4cxx/include -I../include -I../../sutil/include 

LIBS = -L../../../3party/log4cxx/lib -L../../../3party/apr/lib -llog4cxx -L../../../lib -lsutil -lsscf

CXXFLAGS = -g -Wall -O2

.PHONY : all

all: $(TARGETS) 

$(SSCF_TEST_TARGET): $(SSCF_TEST_OBJFILE)
	        $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@


$(SOCKETPOOL_TEST_TARGET): $(SOCKETPOOL_TEST_OBJFILE)
	        $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@


$(SSERVER_TEST_TARGET): $(SSERVER_TEST_OBJFILE)
	        $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@

%.o : %.cpp
	        $(CXX) -c $(CXXFLAGS) $(INC_DIR) $< -o $@

.PHONY : clean

clean:
	        rm -f *.o $(TARGETS)
